// 管理端路由
const adminRoutes = {
  path: '/admin',
  name: 'AdminLayout',
  component: () => import('@/views/admin/layout.vue'),
  redirect: '/admin/dashboard',
  meta: { 
    title: '管理端', 
    requiresAuth: true,
    roles: ['admin']
  },
  children: [
    {
      path: 'dashboard',
      name: 'AdminDashboard',
      component: () => import('@/views/admin/dashboard.vue'),
      meta: { title: '系统概览', icon: 'dashboard' }
    },
    {
      path: 'user',
      name: 'AdminUser',
      component: () => import('@/views/admin/user/index.vue'),
      meta: { title: '用户管理', icon: 'user' }
    },
    {
      path: 'employee',
      name: 'AdminEmployee',
      component: () => import('@/views/admin/employee/index.vue'),
      meta: { title: '员工管理', icon: 'employee' }
    },
    {
      path: 'store',
      name: 'AdminStore',
      component: () => import('@/views/admin/store/index.vue'),
      meta: { title: '门店管理', icon: 'store' }
    },
    {
      path: 'medicine',
      name: 'AdminMedicine',
      component: () => import('@/views/admin/medicine/index.vue'),
      meta: { title: '药品管理', icon: 'medicine' }
    },
    {
      path: 'permission',
      name: 'AdminPermission',
      component: () => import('@/views/admin/permission/index.vue'),
      meta: { title: '权限管理', icon: 'permission' }
    },
    {
      path: 'analysis',
      name: 'AdminAnalysis',
      component: () => import('@/views/admin/analysis/index.vue'),
      meta: { title: '数据分析', icon: 'analysis' }
    },
    {
      path: 'order',
      name: 'AdminOrder',
      component: () => import('@/views/admin/order/index.vue'),
      meta: { title: '订单管理', icon: 'order' }
    },
    {
      path: 'order/detail/:id',
      name: 'AdminOrderDetail',
      component: () => import('@/views/admin/order/detail.vue'),
      meta: { title: '订单详情', icon: 'order-detail' },
      hidden: true
    }
  ]
}

export default adminRoutes